Flash media is a becoming an increasingly popular and inexpensive medium commonly used for persistent data storage in embedded devices. Unlike common magnetic read/write disks, which allow sectors to be randomly read from and written to, flash media requires that blocks be erased before being re-written. The erase resolution (e.g., one block) is typically much larger than the read/write resolution (e.g., one sector or page). Care must also be taken when writing to flash media in order to distribute writes evenly across the flash part, a technique referred to sometimes as “wear-leveling.” Each flash block has a limited number of erase operations before it wears out. In addition, some flash parts even have strict requirements on the order that sectors can be written in a block. Consequently, the interface for reading and writing flash is considerably different that the interface for reading and writing a magnetic disk. Accordingly, there may be a need for improved techniques for flash management to solve these and other problems.